package com.jiaozi.system.pojo.vo.sys.configs;

import com.alibaba.fastjson.annotation.JSONField;
import com.jiaozi.core.table.annotation.Column;
import com.jiaozi.system.enums.ConfigsEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(name = "系统参数")
@Data
public class ConfigListVO {
    @Schema(description = "参数主键")
    private String id;


    /**
     * 参数名
     **/
    @Schema(description = "参数名")
    @Column(label = "参数名",order = 1)
    private String configName;

    /**
     * 参数类型
     */
    @JSONField(serialize = false)
    @Schema(description = "参数类型")
    private ConfigsEnum configType;
    /**
     * 参数键名
     **/
    @Schema(description = "参数键名")
    @Column(label = "参数键",order = 2)
    private String configKey;

    /**
     * 参数键值
     **/
    @Schema(description = "参数值")
    @Column(label = "参数值",order = 3,width = "200")
    private String configValue;


    /**
     * 备注
     **/
    @Schema(description = "备注")
    @Column(label = "备注",order = 4)
    private String remarks;

    public String getDefaultVal() {
        return configType.getConfigValue();
    }
}
